Finish identity migration and expose Workbench provenance - #322
Conversation
…tion Expose honest receipt-sourced context in lifecycle replays and remove remaining runtime identity restatements while deprecating plugin.version.
🦋 Changeset detectedLatest commit: 9606914 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9606914a5d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| invocation: { | ||
| ...(request.requestContext.invocation.hostContractRevision === undefined | ||
| ? {} | ||
| : { hostContractRevision: request.requestContext.invocation.hostContractRevision }), | ||
| }, |
There was a problem hiding this comment.
Mount all reported invocation fields into the replay scope
For lifecycle routes that read await agent().invocation, the default child-process replay copies only hostContractRevision here, and the in-process renderContext helper repeats the omission. renderRouteEvents therefore synthesizes surface as the route ID and leaves operationId undefined, even though the response reports operationId: event:<event> and surface: <event>. This makes route behavior and replay output diverge from the provenance displayed in Workbench; pass the reported operationId and surface through both render paths.
Useful? React with 👍 / 👎.
| hostContractRevision: string, | ||
| ): RequestContextProvenance => { | ||
| const sessionId = nativeText(native, 'session_id') ?? nativeText(native, 'conversation_id'); | ||
| const workspaceRoot = nativeText(native, 'cwd'); |
There was a problem hiding this comment.
Do not report supplied Cursor workspace roots as missing
For Cursor workspace/open replays, the validated native envelope requires a nonempty workspace_roots array and normally has no cwd, so this lookup always produces an unavailable workspace with reason not-provided. The Workbench consequently claims the workspace was absent, and the replayed route receives the same false absence, even though the receipt supplied workspace roots. Account for workspace_roots when projecting this surface, or use an unsupported-surface representation if multiple roots cannot be represented.
Useful? React with 👍 / 👎.
…d content (#200) (#332) * fix(examples/rsc-agent-runtime): dedupe reloads by emitted content Use the App compiler's in-memory asset bytes as the reload identity so split watch completions cannot spend extra generations when Rspack stats hashes drift. * test(workbench): expect the package version in project source identity The identity migration (#322) surfaces packageVersion in project source status; the overview handoff assertion predates it on this branch's base.
* fix(claude): validate numeric config bounds in artifacts (#287 r3911238592) * fix(claude): reject marketplace backslash traversal (#314 r3918535243) * fix(claude): validate authority-only archive hosts (#314 r3918535249) * fix(replay): preserve invocation provenance in renderers (#322 r3919341927) * fix(replay): derive workspace from cursor roots (#322 r3919341940) * fix(dev): invalidate watcher on chmod changes (#329 r3919499846) * chore: add framework review fixes changeset
Summary
plugin.versionand removing remaining runtime/App identity restatements in favor of package-derived or compiler-stamped identityTest plan
pnpm typecheckpnpm lintNotes
A broader post-rebase examples-contract run passed the changed MCP App and lifecycle scopes but still reports the concurrent Audiobook Curator route-count assertion at 17 while current main produces 18; this PR does not touch that unrelated lane.